/* ----------------------------------------------------------------------------
* File: module_controller.h
*
* Desc: Module controller interface for Skype plugin
*
* Created: 13/07/2011, by Alexey Korshunov
* ---------------------------------------------------------------------------- */
#ifndef _MODULE_CONTROLLER_H_
#define _MODULE_CONTROLLER_H_

#include <memory>
#include <vector>
#include "base_module.h"
#include "error.h"

namespace ModuleManagement
{
	class ModuleController
	{
	public:
		virtual ~ModuleController()
		{
		}

		virtual Common::Error RegisterModule(const BaseModule* module, size_t& ID) = 0;
		virtual Common::Error RegisterModule(const BaseModule* module, const std::string& ChatName, size_t& ID) = 0;
		virtual Common::Error UnregisterModule(size_t ID) = 0;
		virtual const BaseModule* FindModuleByID(size_t ID) = 0;
		virtual std::vector<BaseModule*> FindModulesByChat(const std::string& ChatName, const ModuleType& type = MODULE_TYPE_UNKNOWN) = 0;
	};

	std::auto_ptr<ModuleController> CreateModuleController();
}

#endif // _MODULE_CONTROLLER_H_